<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"    
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>    
        <title>Updates</title>
        <link rel="stylesheet" href="css/mycss.css" type="text/css"></link>
    </h:head>
    
    <body style="background-color:#F0FFFF"></body>
    
    <h:body>
        <h:form id="form">
            
            <em><font size="7"><h:outputText style="color: orange; position: absolute; 
                                         top: 30px; left: 570px;" value="Updates List"/></font></em>
            
            <p:growl id="msgs" showDetail="true"/>

            <p:dataTable id="updateDetail" var="u" style="position: absolute;left: 30px;top: 120px;
                         width: 1306px" value="#{updates.updateList}">
  

                <p:column  headerText="Text" style="width:100px;text-align:center">
                    <h:outputText value="#{u.text}"/>
                </p:column>

                <p:column  headerText="Read" style="width:40px;text-align:center">
                    <p:commandButton icon="ui-icon-check"
                                     style="width:40px;height:30px"
                                     action="#{updates.ReadUpdate(u.id)}" />  
                </p:column>
                
            </p:dataTable>
            
            <br/><center><p:commandButton value="Back to your Homepage" action="#{counter.count()}"
                                     style="width:300px;height:60px;top:480px;background-color:#90A4FD;"/></center>
                                     
        </h:form>
    </h:body>
</html>
